package com.example.leetcode.graph;

import com.example.leetcode.graph.common.GraphUtils;

class Solution1857 {
    public int largestPathValue(String colors, int[][] edges) {
        return GraphUtils.largestPathValue(colors, edges);
    }
}

public class leetcode1857 {
    public static void main(String[] args) {
        Solution1857 solution1857 = new Solution1857();
        String colors = "abaca";
        int[][] edges = {{0, 1}, {0, 2}, {2, 3}, {3, 4}};
        String colors1 = "hhqhuqhqff";
        int[][] edges1 = {{0, 1}, {0, 2}, {2, 3}, {3, 4}, {3, 5}, {5, 6}, {2, 7}, {6, 7}, {7, 8}, {3, 8}, {5, 8}, {8, 9}, {3, 9}, {6, 9}};
        System.out.println(solution1857.largestPathValue(colors, edges));
//        System.out.println(solution1857.largestPathValue(colors1, edges1));
    }
}
